import React, { Component } from 'react'
import { connect } from 'react-redux'
import { Button  } from 'antd'


 class ReduxdomeTwo extends Component {
      constructor(){
          super()
          this.state = {

          }
      }
  
   handleok = ()=>{
       console.log('接收者');
   }
    render() {
        return (
            <div style={{marginTop:"50px"}}>
                <span>{ this.props.count }</span>
                <Button onClick={this.handleok}>接收者</Button>
            </div>
        )
    }
}
// 接收方
const mapStateToProps = (state, ownProps) => {
    return {
        count: state.count
    }
}

export default connect(mapStateToProps)(ReduxdomeTwo)